import Login from "../pages/Login";
import PageNotFound from "../pages/PageNotFound.js";
import Index from "../pages/admin/dashboard/Index";
import List from "../pages/admin/products/List";
import Edit from "../pages/admin/products/Edit";
import NotFound from "../pages/admin/notFound";
import Manage from '../pages/admin/manage/index'
import Info from '../pages/admin/manage/info/index'
import Lists from '../pages/admin/manage/list/index'
// import { UserOutlined, LaptopOutlined, NotificationOutlined } from '@ant-design/icons';


export const mainRoutes = [
    {
        path: "/login",
        element: <Login />
    },
    {
        path: "/404",
        element: <PageNotFound/>
    },
    {
        path: "/403",
        element: <NotFound/>
    }
];

export const adminRoutes = [
    {
        path: "/admin/dasshboard",
        element: <PageNotFound/>,
        isShow: false,
        title: "看板",
    },
    {
        path: "/admin/dashboard",
        element: <Index/>,
        isShow: true,
        title: "看板",
    },
    {
        path: "/admin/products",
        element: <List/>,
        exact: true,
        isShow: true,
        title: "商品管理",
    },
    {
        path: "/admin/products/edit/:id?",  // io设为可选参数
        element: <Edit/>,
        isShow: false,
    },
    {
        path: "/admin/manage",  // io设为可选参数
        // element: <Manage/>,
        exact: true,
        isShow: true,
        title: "商品设置",
        children: [
            {
              path: '/admin/manage/info',
              element: <Info/>,
              exact: true,
              isShow: true,
              title: "商品详情",
            },
            {
                path: '/admin/manage/list',
                element: <Lists/>,
                exact: true,
                isShow: true,
                title: "商品列表",
              }
          ]
    },
    {
        path: "/admin/manages",  // io设为可选参数
        // element: <Manage/>,
        exact: true,
        isShow: true,
        title: "商品设置",
        children: [
            {
              path: '/admin/manages/infos',
            //   element: <Info/>,
              exact: true,
              isShow: true,
              title: "商品详情",
              children: [
                {
                  path: '/admin/manages/infos/ss',
                  element: <Info/>,
                  exact: true,
                  isShow: true,
                  title: "商品详情",
                },
                {
                    path: '/admin/manages/infos/sss',
                    element: <Lists/>,
                    exact: true,
                    isShow: true,
                    title: "商品列表",
                  }
              ]
            },
            {
                path: '/admin/manages/lists',
                element: <Lists/>,
                exact: true,
                isShow: true,
                title: "商品列表",
              }
          ]
    }
];